﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Messaging;
using CommunityToolkit.Mvvm.Messaging.Messages;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Daq.Models
{
    public enum ChartTimeDivision
    {
        //time / div
        [Display(Name = "100 ms/div")]
        _100ms,
        [Display(Name = "200 ms/div")]
        _200ms,
        [Display(Name = "500 ms/div")]
        _500ms,
        [Display(Name = "1 s/div")]
        _1s,
        [Display(Name = "2 s/div")]
        _2s,
        [Display(Name = "5 s/div")]
        _5s,
        [Display(Name = "10 s/div")]
        _10s,
        [Display(Name = "20 s/div")]
        _20s,
        //[Display(Name = "50 s/div")]
        //_50s,
        //[Display(Name = "100 s/div")]
        //_100s
    }

    
    

    public partial class ChartSettingsModel : ObservableRecipient
    {
        
        [ObservableProperty]
        [NotifyPropertyChangedRecipients]
       
        private ChartTimeDivision timeDivision = ChartTimeDivision._1s;

        partial void OnTimeDivisionChanged(ChartTimeDivision oldValue, ChartTimeDivision newValue)
        {
            WeakReferenceMessenger.Default.Send(new ValueChangedMessage<ChartTimeDivision>( newValue));
        }
    }
}
